misc
Class SetTools

java.lang.Object
  extended by misc.SetTools

public class SetTools
extends java.lang.Object

Class which generates the Cartesian product of a list of sets. Can be optimized by using an iterative approach.

Author:
Mark Hendrikx

Constructor Summary
SetTools()
           
 
Method Summary
static
<A> java.util.Set<java.util.Set<A>>
cartesianProduct(java.util.Set<A>... sets)
          Given a list of sets, this method returns the Cartesian product of the given sets.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetTools

public SetTools()
Method Detail

cartesianProduct

public static <A> java.util.Set<java.util.Set<A>> cartesianProduct(java.util.Set<A>... sets)
Given a list of sets, this method returns the Cartesian product of the given sets.

Type Parameters:
A - class of object contained in set.
Parameters:
sets - sets of objects which Cartesian product must be determined.
Returns:
set of sets symbolizing the Cartesian product